home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
tcoop10a.zip
/
DOC.ZIP
/
WINDOW.DOC
< prev
Wrap
Text File
|
1991-11-20
|
5KB
|
128 lines
WINDOW.DOC 11/20/91 Copyright (c) 1991 by James S. Clark
==========================================================================
WINDOW
Window Class
--------------------------------------------------------------------------
Class Name Window
Superclass Node
Category Desktop
Other classes referenced <none>
Other catagories referenced <none>
Used by many
Inherited by Menu
Declaration Window *window = new Window("Title", 10, 10,
20, 15, flags, colors);
Instance Variables
int id;
int flag;
char *backdata;
int x1, y1;
int x2, y2;
colors *color;
char *title;
Instance Methods
Window (char *title, int x1, int y1,
int x2, int y2, int flags,
colors *clr);
~Window () { };
void close ();
void emboss ();
void frame (int hilight);
void settitle(char *theTitle, int hilight);
void shadow ();
int startup ();
--------------------------------------------------------------------------
GENERAL DESCRIPTION
The Window Class provides a simple set of methods for creating colored
text windows on the screen. Methods are provided for drawing and erasing
windows, as well as special routines creating drop-shadows and embossing
the frame. The Window flag controls the appearance of the frame and other
features specific to each window.
--------------------------------------------------------------------------
VARIABLES (all private)
int id;
The Window's ID number.
int flag;
The current window attribute flag.
char *backdata;
Pointer to the window background text buffer.
int x1, y1;
The upper left corner of the window.
int x2, y2;
The lower right corner of the window.
colors *color;
Color set used to draw the window.
char *title;
Pointer to the window's title, if any.
--------------------------------------------------------------------------
METHODS
Window (char *title, int x1, int y1, int x2, int y2, int flags, colors *clr);
Creates a new window of the stated size, attributes, and colors.
The window will be drawn immediately.
~Window () { };
Destroys the window. Same as the close method.
void close ();
Erases the window from the screen, and deletes its backdata.
void emboss ();
void frame (int hilight);
Draws a frame around the window.
void settitle(char *theTitle, int hilight);
Changes the window title and displays it.
void shadow ();
Draws a drop-shadow under the lower right edge of the window.
int startup ();
Initializes the Desktop system. Should be called first, before
issuing any other commands.
int textbox(int x1, int y1, int x2, int y2, int mode, char *str);
This method will print text in the window using the parameters
given as the boundry. The mode can be set to left, center,
or right justification.
--------------------------------------------------------------------------
WINDOW FLAG ATTRIBUTES
The flags may be passed at the time of the window's creation.
W_BLANK the window is blank, without a frame, title, etc.
W_TITLE the window has a title
W_FRAME the window has a frame
W_DOUBLE the frame is a double border
W_SHADOW the window has a drop-shadow on the lower right
W_EMBOSS the window frame is embossed
W_CLOSE the window has a close button (unused)
W_ZOOM the window has a zoom button (unused)
W_SIZE the window has a size button (unused)
W_SHOWING the window is currently showing (unused)
--------------------------------------------------------------------------
TEXTBOX MODE ATTRIBUTES
The flags are passed as the mode in the textbox() method.
T_LEFT left justisfied text (default)
T_CENTER center justified text
T_RIGHT right justified text
--------------------------------------------------------------------------
WINDOW.DOC Copyright (c) 1991 by James S. Clark
==========================================================================